{% extends "users/base.html" %}

{% block subtitle %}帐号绑定{% endblock %}

{% block main %}
<div class="row">
	<div class="col-lg-4 col-lg-offset-4 col-md-6 col-md-offset-3">
		<div class="box">
			<div class="bind-email">
				<div class="message-box">
					<ul class="nav nav-tabs nav-justified" role="tablist">
					  	<li role="presentation" class="active"><a>绑定邮箱</a></li>
					</ul>
					<div class="message">{{ email_form | alert }}</div>
				</div>
				<form class="auth-form reset-password-email-form" method="post">
					{{ email_form | kform_inline }}
					<button type="submit" class="btn btn-primary btn-block btn-lg" autocomplete="off">发送验证邮件</button>
					<a class="btn btn-default btn-block btn-lg use-phone" href="javascript:;">绑定手机号码</a>
				</form>
				<div class="email-access"></div>
			</div>
			<div class="bind-phone" style="display:none">
				<div class="message-box">
					<ul class="nav nav-tabs nav-justified" role="tablist">
					  	<li role="presentation" class="active"><a>绑定手机号码</a></li>
					</ul>
					<div class="message">{{ phone_form | alert }}</div>
				</div>
				<form class="auth-form bind-form" method="post">
					{{ phone_form.csrf_token | kfield_inline }}
					{{ phone_form.phone | kfield_inline }}
					<div class="verify-code-box">{{ phone_form.verify_code | kfield_inline }}</div>
					<div class="form-group auth-form-group">
						{{ phone_form.authcode(
							class_="form-control",
							data_label=phone_form.authcode.label.text,
							placeholder=phone_form.authcode.label.text,
							style="display:none"
						) }}
						<a class="resend disabled" href="javascript:;" style="display:none">重新发送</a>
					</div>
					{{ phone_form.password | kfield_inline(style="display:none") }}
					{{ phone_form.repassword | kfield_inline(style="display:none") }}
					<button type="submit" class="btn btn-primary btn-lg btn-block" autocomplete="off">发送验证码</button>
					<a class="btn btn-default btn-block btn-lg use-email" href="javascript:;">绑定邮箱</a>
				</form>
			</div>
		</div>
	</div>
</div>
{% endblock %}

{% block footer %}
<div class="text-center links">
	<a href="/">跳过帐号绑定</a>
</div>
{% endblock %}